<!DOCTYPE html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <title>会议室预约</title>
    <meta name="description" content="">
    <meta name="HandheldFriendly" content="True">
    <meta name="MobileOptimized" content="320">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui, user-scalable=no">
    <meta http-equiv="cleartype" content="on">
    <meta name="format-detection" content="telephone=no">

    <link rel="stylesheet" href="/assets/meeting/css/layer.css">
    <link rel="stylesheet" href="/assets/meeting/css/style.css">
</head>
<body>
<div class="wraper" js="wapjs/meeting/js/index">

    <div class="head clearfix">
        <if condition="$audited eq 1">
            <a href="{BEESCRM::U('/meeting/meetingAppoint/unaudited',array('account_id'=>$accountId,'audited' => $audited))}" class="iconfont icon-zuo"></a>
        </if>
        <if condition="$audited eq 2">
            <a href="{BEESCRM::U('/meeting/meetingAppoint/audited',array('account_id'=>$accountId,'audited' => $audited))}" class="iconfont icon-zuo"></a>
        </if>
        <span class="head-name">详情</span>
    </div>

    <volist name="data" id="vo">
        <include file="Append/checkcondition" />

        <p class="blobk-title text-12"><if condition="$vo.room_type eq 1">会议预约详情</if><if condition="$vo.room_type eq 2">户外场所预约详情</if></p>
        <div class="lists tb-mode">
            <div class="text-12">

                <p class="text-14">{BEESCRM:$vo.room_name}</p>
                <if condition="$vo.room_type eq 2">
                    <p class="text-gray">社团名称：{BEESCRM:$vo.community}</p>
                    <p class="text-gray">联系人：{BEESCRM:$vo.contacts}</p>
                </if>
                <foreach name="appointTimeSection" item="v" key="key">
                    <p class="text-gray">预约时段{BEESCRM:$key+1}:<span>{BEESCRM:$v.start_time|date="md H:i",###}-{BEESCRM:$v.end_time|date="md H:i",###}</span>
                    <span>
                        <php>
                            $weekday = array('星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六');
                            echo $weekday[date('w',$vo['start_time'])];
                        </php>
                    </span>
                    </p>
                </foreach>
                <p class="text-gray">申请人:{BEESCRM:$vo.real_name} 电话：{BEESCRM:$vo.mobile}</p>
            </div>
            <if condition="$vo['multilevel'] eq 0">
                <div class="tb-cell text-right">
                    <a href="{BEESCRM::U('/meeting/meetingRoom/weekPanel/',array('level' => 0,'meeting_room_id' => $vo['meeting_room_id'],'account_id' => $accountId,'showDetail' => 1))}" class="iconfont icon-yudingqingkuang text-normal text-20"></a>
                </div>
            </if>
        </div>

        <p class="blobk-title text-12"><if condition="$vo.room_type eq 1">会议详情</if><if condition="$vo.room_type eq 2">活动详情</if></p>
        <div class="lists text-12">
            <div class="list-line">
                <p class="text-14">{BEESCRM:$vo['title']}</p>
                <if condition="$vo.room_type neq 2"><p class="text-gray">主办单位：{BEESCRM:$vo.department_path}</p></if>
                <p class="text-gray">起止时间：{BEESCRM:$vo.start_time|date="Y-m-d H:i",###}至{BEESCRM:$vo.end_time|date="Y-m-d H:i",###}
                    <span>
                        <php>
                            $weekday = array('星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六');
                            echo $weekday[date('w',$vo['start_time'])];
                        </php>
                    </span>
                </p>
            </div>
            <div class="list-line">
                <p class="text-14"><if condition="$vo.room_type eq 1">会议内容</if><if condition="$vo.room_type eq 2">活动内容</if></p>
                <div class="text-gray"><if condition="$vo['content']">{BEESCRM:$vo.content}<else />暂无会议内容</if></div>
            </div>
        </div>
    </volist>
</div>


<input type="hidden" name="basicId" id="basicId" value="{BEESCRM:$basicId}">
<script type="text/javascript" src="/assets/public/seajs/sea.js"></script>
<script enter="publicjs/public" id="confnode" async="async" src="/assets/public/config.js"></script>
<script type="text/javascript" src="/assets/base/newCharging/modules/jquery-2.1.0.min.js"></script>
<include file="Append/checknopass" />
<script>

    $(document).on('click','.review_pass',function(){ //复审通过
        var id = $(this).data('id');
        var basicId = $("#basicId").val();
        fm.confirm('是否确认审核通过本次申请',function(callback){
            if( callback==1 ){ pass(id,basicId); }
        });
        function pass(id,basicId){
            var data = {};
            data.check_id = id;
            data.basic_id = basicId;
            data.type = 6;
            $.ajax({
                url:"{BEESCRM::U('/meeting/meetingAppoint/appointSetting',array('account_id'=>$accountId))}",
                type:"post",
                data:data,
                dataType:'json',

                success:function(res){
                    fm.closeLayer(2);
                    fm.alert(res.message,'',2);
                    setTimeout('location.href="/meeting/meetingAppoint/unaudited/audited/2/account_id/{BEESCRM:$accountId}"',3000);
                },
                error:function(res){
                    fm.alert(res.message,'',2);
                }
            })
        }
    });

</script>

</body>
</html>